import axios from 'axios'


const login = {
    //用户登录
    userLogin(username, password) {
        return axios({
            url: '/users/login',
            method: 'POST',
            data: {
                username: username,
                password: password
            }
        })
    },
    //获取用户信息
    getuserinfo() {
        return axios({
            url: '/users/getUserInfo',
            method: 'GET',
            headers: { Authorization: localStorage.token }
        })
    }
}

export default login;